home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / QuickDraw / Virtual Sphere 1.0.1 / Virtual Sphere Sample Code 1.1 / Offscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-25  |  1.6 KB  |  51 lines  |  [TEXT/MPS ]

  1. /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. /* Offscreen.h
  3. /*
  4. /* Yet another offscreen drawing module that uses GWorld to eliminate drawing flicker.
  5. /*
  6. /* Basic calling sequence is the following:
  7. /*        InitOffscreen (...);
  8. /*        window = GetNewWindow (...);
  9. /*        CheckOffscreenForWindow (&gWorld, window, ...);
  10. /*        while (1) {
  11. /*            CheckOffscreenForWindow (&gWorld, window, ...);
  12. /*            BeginDrawingOffscreen (&gWorld, window);
  13. /*            ... Draw Something ...
  14. /*            EndDrawingOffscreen (&gWorld, window);
  15. /*        }
  16. /*        FreeOffscreen (&gWorld);
  17. /*
  18. /* Author: Michael Chen, Human Interface Group / ATG
  19. /* Copyright © 1991-1993 Apple Computer, Inc.  All rights reserved.
  20. /*
  21. /* Part of Virtual Sphere Sample Code Release v1.1
  22. /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  23.  
  24. #ifndef    __OFFSCREEN__
  25. #define __OFFSCREEN__
  26.  
  27. #ifndef __GLOBALS__
  28. #include "Globals.h"
  29. #endif
  30.  
  31. #ifndef __QDOFFSCREEN__
  32. #include <QDOffscreen.h>
  33. #endif
  34.  
  35. /* Must be called before any other routines in this module.  The other
  36.  * routines should not be called if GWorld is not available */
  37. pascal OSErr    InitializeOffscreen (Boolean *gWorldAvailable);
  38.  
  39. pascal void        FreeOffscreen (GWorldPtr offscreenGWorld);
  40.  
  41. pascal QDErr    CheckOffscreenForWindow (GWorldPtr *offscreenGWorld,
  42.                                            short       pixelDepth,
  43.                                            WindowPtr window);
  44.  
  45. pascal void        BeginDrawingOffscreen (GWorldPtr offscreenGWorld, WindowPtr window);
  46. pascal void        EndDrawingOffscreen   (GWorldPtr offscreenGWorld, WindowPtr window);
  47.  
  48.  
  49.  
  50. #endif __OFFSCREEN__
  51.